package com.zhiyizhen.handheld.component.pharmacy.api;

import com.zhiyizhen.handheld.component.pharmacy.bean.GiveDetailBean;
import com.zhiyizhen.handheld.component.pharmacy.bean.GiveDosageUserBean;
import com.zhiyizhen.handheld.component.pharmacy.bean.RegimenRecordBean;
import com.zhiyizhen.handheld.component.pharmacy.bean.RejectDeliveryReq;
import com.zhiyizhen.handheld.net.response.ResponseData;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * 发药
 */
public interface IGiveDosageService {

    /**
     * 药房发药：获取发药单列表
     */
    @GET("/web/order/dispense/getDeliveryList")
    Observable<ResponseData<List<GiveDosageUserBean>>> getDeliveryList(@Header("token") String token, @Header("clinicId") String clinicId, @QueryMap Map<String, Object> params);

    /**
     * 药房发药：查询发药单详情
     */
    @GET("/web/order/dispense/getDeliveryDetail")
    Observable<ResponseData<GiveDetailBean>> getDispenseDetail(@Header("token") String token, @Header("clinicId") String clinicId, @Query("orderId") String orderId);

    /**
     * 药房发药：获取患者发药历史
     */
    @GET("/web/order/dispense/getDeliveryHistoryList")
    Observable<ResponseData<List<RegimenRecordBean>>> getDispenseHistoryList(
            @Header("token") String token,
            @Header("clinicId") String clinicId,
            @Query("patientId") String patientId,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );


    /**
     * 药房发药：发药单审核
     */
    @POST("/web/order/dispense/rejectDelivery")
    Observable<ResponseData<String>> rejectDelivery(@Header("token") String token, @Header("clinicId") String clinicId, @Body RejectDeliveryReq rejectDeliveryReq);



}
